package com.along.framework.utils;

public class PatinationUtil {
	private static int DISPALY_COUNT=5;
	
	private static String INIT_CURRENT_PAGE="0";
	
	public static String getCurrentPage(String currentPage)
	{
		if(currentPage==null || currentPage.length()==0)
		{
			currentPage=PatinationUtil.INIT_CURRENT_PAGE;
		}
		
		return currentPage;
	}
	
	public static int getStartRow(String currentPage)
	{
		if(currentPage==null || currentPage.length()==0)
		{
			currentPage=PatinationUtil.INIT_CURRENT_PAGE;
		}
		
		int SRInt=Integer.parseInt(currentPage)*PatinationUtil.DISPALY_COUNT;
		
		return SRInt;
	}
	
	public static int getEndRow(String currentPage)
	{
		if(currentPage==null || currentPage.length()==0)
		{
			currentPage=INIT_CURRENT_PAGE;
		}
		int ERInt=(Integer.parseInt(currentPage)*PatinationUtil.DISPALY_COUNT)+PatinationUtil.DISPALY_COUNT;
		
		return ERInt;
	}

}
